package com.github;

import com.github.admin.edu.orm.configuration.DynamicDataSourceRegister;
import com.github.admin.edu.orm.repository.impl.CustomRepositoryFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-30
 */
@SpringBootApplication
@EnableEurekaClient
@EnableJpaRepositories(repositoryFactoryBeanClass = CustomRepositoryFactoryBean.class)
@EnableTransactionManagement
@Import({DynamicDataSourceRegister.class})
@EnableAsync
@EnableScheduling
@EnableFeignClients
public class SpringDBApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringDBApplication.class,args);
    }
}
